﻿using System.ComponentModel;

namespace Gx.Model.Enums
{
    public enum Code
    {
        [Description("登录失效")]
        登录失效 = -2,
        /// <summary>
        /// 操作失败
        /// </summary>
        [Description("操作失败")]
        操作失败 = -1,
        /// <summary>
        /// 操作成功
        /// </summary>
        [Description("操作成功")]
        操作成功 = 1,
        /// <summary>
        /// 新增失败
        /// </summary>
        [Description("新增失败")]
        新增失败 = 1000,
        /// <summary>
        /// 编辑失败
        /// </summary>
        [Description("编辑失败")]
        编辑失败 = 1001,
        /// <summary>
        /// 删除失败
        /// </summary>
        [Description("删除失败")]
        删除失败 = 1002,
        /// <summary>
        /// 参数错误
        /// </summary>
        [Description("参数错误")]
        参数错误 = 1003,
        /// <summary>
        /// 重复数据(名称重复)
        /// </summary>
        [Description("重复数据")]
        重复数据 = 1005,
        /// <summary>
        /// 重复数据(名称重复)
        /// </summary>
        [Description("数据不存在")]
        数据不存在 = 1006,
        /// <summary>
        /// 权限不足
        /// </summary>
        [Description("权限不足")]
        权限不足 = 1007,

        /// <summary>
        /// 接口请求错误
        /// </summary>
        [Description("接口请求错误")]
        接口请求错误 = 1050,
        /// <summary>
        /// 接口错误
        /// </summary>
        [Description("接口错误")]
        接口错误 = 1051,
        /// <summary>
        /// 缓存错误
        /// </summary>
        [Description("缓存错误")]
        缓存错误 = 1052,
        /// <summary>
        /// 请求超时
        /// </summary>
        [Description("请求超时")]
        请求超时 = 1052,
        /// <summary>
        /// 
        /// </summary>
        [Description("服务端错误")]
        ServiceError = 1053
    }
}
